package cn.stylefeng.guns.modular.business.frequency.cmcompany.service;

import cn.stylefeng.guns.core.pojo.page.PageResult;
import cn.stylefeng.guns.core.pojo.response.ResponseData;
import cn.stylefeng.guns.modular.business.frequency.cmcompany.entity.CmCompany;
import cn.stylefeng.guns.modular.business.frequency.cmcompany.model.param.*;
import cn.stylefeng.guns.modular.business.frequency.cmcompany.model.result.CompanyVO;
import cn.stylefeng.guns.modular.business.frequency.cmcompany.model.result.LinkmanCheckVO;
import cn.stylefeng.guns.modular.business.frequency.cmcompany.model.result.PkgCompanyOrder;
import cn.stylefeng.guns.modular.business.frequency.cmcompanyline.entity.CmCompanyLine;
import cn.stylefeng.guns.modular.business.frequency.cmdriver.entity.CmDriver;
import cn.stylefeng.guns.modular.business.frequency.cmlinkman.entity.CmLinkman;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 通讯录表 服务类
 *
 * @author yujie
 * @date 2023/05/09 17:17
 */
public interface CmCompanyService extends IService<CmCompany> {

    /**
     * 分页查询通讯录表
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    PageResult<CmCompany> page(CmCompanyParam cmCompanyParam);

    /**
     * 查询所有通讯录表
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    List<CmCompany> list(CmCompanyParam cmCompanyParam);

    /**
     * 添加通讯录表
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    void add(CmCompanyParam cmCompanyParam);

    /**
     * 删除通讯录表
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    void delete(CmCompanyParam cmCompanyParam);

    /**
     * 编辑通讯录表
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    void edit(CmCompanyParam cmCompanyParam);

    /**
     * 查看详情通讯录表
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    CmCompany detail(CmCompanyParam cmCompanyParam);

    /**
     * 修改状态（字典 0正常 1停用 2删除）
     *
     * @author yujie
     * @date 2023/05/09 17:17
     */
    void changeStatus(CmCompanyParam cmCompanyParam);

    ResponseData getCompanyListPage(CompanyDTO companyDTO,List<Long> empByOrgList);

    ResponseData getLinkmanListPage(String companyId, CompanyDTO companyDTO);

    boolean checkCompanyAdd(CompanyVO companyVO, StringBuilder errorMsg);

    void addCompany(CompanyVO companyVO);

    boolean checkCompanyUpdate(CompanyVO companyVO, StringBuilder errorMsg);

    void updateCompany(CompanyVO companyVO);

    CompanyVO getCompanySingleDetail(String id);

    CmCompany getCompanyById(String id);

    void deleteCompany(String id);

    boolean checkLinkmanAdd(CompanyVO companyVO, StringBuilder errorMsg);

    void addLinkman(CompanyVO companyVO);

    CmLinkman getLinkmanSingleDetail(String id);

    void deleteLinkman(String id);

    boolean checkLinkmanUpdate(CmLinkman linkman, StringBuilder errorMsg);

    void updateLinkman(CmLinkman linkman);

    List<CmDriver> getDriverListPage(String companyId, CompanyDTO companyDTO);

    boolean checkDriverAdd(CmDriver driver, StringBuilder errorMsg);

    void addDriver(CmDriver driver);

    boolean checkDriverUpdate(CmDriver driver, StringBuilder errorMsg);

    void updateDriver(CmDriver driver);

    CmDriver getDriverDetail(String id);

    void deleteDriver(String id);

    Page<PkgCompanyOrder> getCompanyOrderListPage(String companyId, Page<Object> defaultPage, CompanyOrderDTO companyOrderDTO);

    boolean checkUnCheckLinkmanAdd(UnCheckCompanyVO companyVO, StringBuilder errorMsg);

    UnCheckCompanyVO addUnCheckLinkman(UnCheckCompanyVO companyVO);

    LinkmanCheckVO getLinkmanCheckDetail(String id);

    boolean checkLinkmanCheck(LinkmanCheckVO linkmanCheckVO, StringBuilder errorMsg);

    void checkLinkman(LinkmanCheckVO linkmanCheckVO);

    List<UnCheckCompanyVO> getHasCheckCompanyList();


    List<OrderLinkmanVO> getOrderLinkmanSuggest(OrderLinkmanVO orderLinkmanVO);

    List<OrderLinkmanVO> getLinkmanListByIds(List<String> linkmanIds);

    List<CmCompanyLine> getCompanyLineListById(String companyId);

    void importExcel(MultipartFile file);

    void changeLinkmanOwnerUser(CmLinkman linkman);

    void setHasSelf(Long id);

    List<OrderLinkmanVO> getOrderLinkmanSuggestAll(OrderLinkmanVO orderLinkmanVO);
}